/**
 * Created by yuris on 19.01.15.
 */
package InterfaceObjects {
import feathers.controls.Button;
import feathers.display.Scale9Image;
import feathers.textures.Scale9Textures;

import starling.display.Image;

import starling.filters.ColorMatrixFilter;

public class ButtonSmall extends Button {
    public static const BLUE_TYPE:String = "blue";
    public static const ORANGE_TYPE:String = "orange";
    public static const GREEN_TYPE:String = "green";
    public static const RED_TYPE:String = "red";

    public static const SIGN_OK:String = "sign_ok";
    public static const SIGN_ARRAY:String = "sign_array";
    public static const SIGN_HELMET:String = "sign_helmet";
    public static const SIGN_BUILD:String = "sign_build";
    public static const SIGN_CROSS:String = "sign_cross";
    public static const SIGN_GEAR:String = "sign_gear";
    public static const SIGN_GIFT:String = "sign_gift";
    public static const SIGN_CUBE:String = "sign_cube";
    public static const SIGN_DOORS:String = "sign_doors";
    public static const SIGN_PAINT:String = "sign_paint";
    public static const SIGN_PAINT_FLOOR:String = "sign_paint_floor";
    public static const SIGN_PAINT_WALL:String = "sign_paint_wall";
    public static const SIGN_REWIND:String = "sign_rewind";
    public static const SIGN_SHOP_BASKET:String = "sign_shop_basket";
    public static const SIGN_TRIANGLE_BIG:String = "sign_triangle_big";
    public static const SIGN_ROTATE_LEFT:String = "sign_rotate_left";
    public static const SIGN_ROTATE_RIGHT:String = "sign_rotate_right";

    public function ButtonSmall(colorType:String = GREEN_TYPE, signType:String = SIGN_OK) {
        super();

        var _texturePath:String = "Interface/Buttons/button_1_small_"+colorType;


        super.defaultSkin = GraphicFactory.getImageByName(_texturePath);
        super.defaultSkin.alignPivot("left","top");

        super.hoverSkin = GraphicFactory.getImageByName(_texturePath);
        super.hoverSkin.alignPivot("left","top");
        var filter:ColorMatrixFilter = new ColorMatrixFilter();
        filter.adjustBrightness(0.08)
        super.hoverSkin.filter = filter;

        super.useHandCursor = true;

        var _signPath:String = "Interface/Signs/"+signType;
        super.defaultIcon = GraphicFactory.getImageByName(_signPath);
        super.defaultIcon.alignPivot("left","top");
    }
}
}
